﻿using System;

using Rarous.TexyNet.Configuration;
using Rarous.TexyNet.Modules;

using Xunit;

namespace Rarous.TexyNet.Test {

  /// <summary>
  /// This is a test class for BlockModuleTest and is intended
  /// to contain all BlockModuleTest Unit Tests
  /// </summary>
  public class BlockModuleTest {

    /// <summary>
    /// A test for BlockModuleConstructorTest1
    /// </summary>
    [Fact]
    public void BlockModule_Constructor_NullConfigElement() {
      BlockModule target = new BlockModule(null);

      Assert.True(target.AllowedHtml);
      Assert.True(target.AllowedPre);
      Assert.True(target.AllowedText);
    }

    /// <summary>
    /// A test for BlockModuleConstructorTest
    /// </summary>
    [Fact]
    public void BlockModule_Constructor_Default() {
      BlockModule target = new BlockModule();

      Assert.True(target.AllowedHtml);
      Assert.True(target.AllowedPre);
      Assert.True(target.AllowedText);
    }


    /// <summary>
    /// A test for AllowedHtmlTest
    /// </summary>
    [Fact]
    public void BlockModule_AllowedHtml_PropertyBehavior() {
      BlockModule target = new BlockModule();
      bool expected = false;
      target.AllowedHtml = expected;

      Assert.Equal(expected, target.AllowedHtml);
    }

    /// <summary>
    /// A test for AllowedPreTest
    /// </summary>
    [Fact]
    public void BlockModule_AllowedPre_PropertyBehavior() {
      BlockModule target = new BlockModule();
      bool expected = false;
      target.AllowedPre = expected;

      Assert.Equal(expected, target.AllowedPre);
    }

    /// <summary>
    /// A test for AllowedTextTest
    /// </summary>
    [Fact]
    public void BlockModule_AllowedText_PropertyBehavior() {
      BlockModule target = new BlockModule();
      bool expected = false;
      target.AllowedText = expected;

      Assert.Equal(expected, target.AllowedText);
    }
  }
}
